import qs from "qs"
// 统一管理接口地址
import request from "@/request/request.js"
// 定义对应的接口
// 精品推荐接口
export const JingPinAPI = () => request.get("/products/recommend")
// 热门兑换
export const ReMenAPI = () => request.get("/products/hot")
// 验证码
export const sendSMSAPI = (params) => request.post("/sendSMS", qs.stringify(params))
// 登录请求
export const PhoneReginAPI = (params) => request.post("/phoneRegin", qs.stringify(params))
// 微信扫码登录请求
export const WeiXinLoginAPI = (params) => request.post("/wechatUsers/PCLogin", qs.stringify(params))
// 手机绑定微信
export const BindingAPI = (params) => request.post("/wechatUsers/binding", qs.stringify(params))
// 获取用户信息
export const UserProfilesAPI = () => request.get("/shop/userProfiles")
// 商品详情
export const GoodsDetailsAPI = (id) => request.get(`/products/${id}`)
// 加入到购物车
export const CartsAddAPI = (params) => request.post("/shop/carts/add", qs.stringify(params))
// 商品搜索
export const GoodsSearchAPI = (params) => request.get("/products", { params })
// 查看购物车
export const CartsDataAPI = () => request.get("/shop/carts")
